import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      title:"首页",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:true,   // 底部标签栏
      isShowtop:true,  // 人气推荐头
    }
  },{
    path: '/Downlist',
    name: 'Downlist',
    component: () => import('../views/home/Downlist.vue'),
    meta:{
      title:"砍价列表",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },{
    path: '/Topiclist',
    name: 'Topiclist',
    component: () => import('../views/home/Topiclist.vue'),
    meta:{
      title:"严选专栏",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },{
    path: '/TopDetail',
    name: 'TopDetail',
    component: () => import('../views/home/TopDetail.vue'),
    meta:{
      title:"专栏详情",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },{
    path: '/Popular',
    name: 'Popular',
    component: () => import('../views/home/Popular.vue'),
    meta:{
      title:"人气推荐",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
      isShowtop:false,  // 人气推荐头
    }
  },{
    path: '/CartDetail',
    name: 'CartDetail',
    component: () => import('../views/home/CartDetail.vue'),
    meta:{
      title:"商品详情",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },
  {
    path: '/Classify',
    name: 'Classify',
    component: () => import('../views/Classify.vue'),
    meta:{
      title:"分类",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:true,   // 底部标签栏
    }
  },{
    path: '/Classlist',
    name: 'Classlist',
    component: () => import('../views/classify/Classlist.vue'),
    meta:{
      title:"分类商品",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },
  {
    path: '/Cart',
    name: 'Cart',
    component: () => import('../views/Cart.vue'),
    meta:{
      title:"购物车",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:true,   // 底部标签栏
    }
  },{
    path: '/Order',
    name: 'Order',
    component: () => import('../views/cart/Order.vue'),
    meta:{
      title:"确认订单",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },{
    path: '/Payment',
    name: 'Payment',
    component: () => import('../views/cart/Payment.vue'),
    meta:{
      title:"确认付款",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },
  {
    path: '/Person',
    name: 'Person',
    component: () => import('../views/Person.vue'),
    meta:{
      title:"个人",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:true,   // 底部标签栏
    }
  },{
    path: '/Login',
    name: 'Login',
    component: () => import('../views/person/Login.vue'),
    meta:{
      title:"登录",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },{
    path: '/Register',
    name: 'Register',
    component: () => import('../views/person/Register.vue'),
    meta:{
      title:"注册",
      isShowTitle:false,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },{
    path: '/Site',
    name: 'Site',
    component: () => import('../views/person/Site.vue'),
    meta:{
      title:"我的地址",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
      right:"新建地址",
      isShowRight:true,
    }
  },{
    path: '/Address',
    name: 'Address',
    component: () => import('../views/person/Address.vue'),
    meta:{
      title:"新增地址",
      isShowTitle:true,   // 头部导航栏
      isShowTabbar:false,   // 底部标签栏
    }
  },
]

const router = new VueRouter({
  routes
})

export default router
